/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package entity.MRP.MaterialRequirement;

import entity.MRP.ProductionPlan.PlannedWeeklyDemand;
import java.io.Serializable;
import java.util.List;
import javaclass.MaterialReqStt;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;

/**
 *
 * @author Vincent
 */
@Entity
public class WeeklyMaterialReq implements Serializable {
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private Long id;

    @OneToOne
    private PlannedWeeklyDemand plannedWeeklyDemand;
    
    @OneToMany
    private List<IndividualMatReq> individualMatReqs;
    
    @OneToOne
    private MaterialReqAmdt materialReqAmdt;
    
    //status used for retrieve and display (SCM side)
    private MaterialReqStt status;
    
    //need one or two variables to display what week it is
    //for example
    // private Date startDate, endDate;
    //or
    //private Long week; (number of week in the year)
    //to display so that user knows what week it is.
    
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public List<IndividualMatReq> getIndividualMaterialRequirements() {
        return individualMatReqs;
    }

    public void setIndividualMaterialRequirements(List<IndividualMatReq> individualMatReqs) {
        this.individualMatReqs = individualMatReqs;
    }

    public PlannedWeeklyDemand getPlannedWeeklyDemand() {
        return plannedWeeklyDemand;
    }

    public void setPlannedWeeklyDemand(PlannedWeeklyDemand plannedWeeklyDemand) {
        this.plannedWeeklyDemand = plannedWeeklyDemand;
    }

    public MaterialReqStt getStatus() {
        return status;
    }

    public void setStatus(MaterialReqStt status) {
        this.status = status;
    }

    public MaterialReqAmdt getMaterialReqAmdt() {
        return materialReqAmdt;
    }

    public void setMaterialReqAmdt(MaterialReqAmdt materialReqAmdt) {
        this.materialReqAmdt = materialReqAmdt;
    }
    
}
